-
Notifications
You must be signed in to change notification settings - Fork 63
feat: Resolve AttributeError in TableWidget and improve initialization #1937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shuoweil
wants to merge
43
commits into
main
Choose a base branch
from
shuowei-anywidget-remove-len-call
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
aee37a7
to
303c4af
Compare
tswast
reviewed
Jul 25, 2025
Please also update the benchmarks to use the |
fc38cf3
to
f643cfb
Compare
Let's use a separate PR for this request. #1949 |
e12c8ff
to
f8ab27b
Compare
f8ab27b
to
df85824
Compare
tswast
reviewed
Jul 31, 2025
df85824
to
2756968
Compare
5bc65ce
to
26eb25e
Compare
- Reinstated 'Iterator[pd.DataFrame]' inheritance for 'PandasBatches' in 'bigframes/core/blocks.py'. - Removed internal type hint 'bigframes.core.blocks.PandasBatches:' from 'to_pandas_batches' docstring in 'bigframes/dataframe.py' to avoid exposing internal types in public documentation.
This reverts the import path for the benchmark utils to 'benchmark.utils' to address concerns about google3 imports.
d6ec1da
to
a66f7f2
Compare
PandasBatches.total_rows
in anywidget TableWidget
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: bigquery
Issues related to the googleapis/python-bigquery-dataframes API.
size: l
Pull request size is large.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces enhancements to the
TableWidget
by improving its initialization and robustness, specifically addressing anAttributeError
related to the_batches
attribute.Key improvements include:
Enhanced Initialization: Ensures the
_batches
attribute is correctly initialized in theTableWidget
constructor by calling_reset_batches_for_new_page_size
before it is accessed, making the widget more reliable from creation.Improved Typing: Added explicit type hints for
_batches
to resolve MyPy errors, contributing to better code clarity and maintainability.Refactored Batch Handling: Changed the
to_pandas_batches
call to the internal_to_pandas_batches
to ensure the correctPandasBatches
object is returned, satisfying type requirements and streamlining internal data handling.Test Enhancements: Added new tests to verify the widget's row count is immutable after creation and that it gracefully handles cases with invalid total rows, ensuring the stability of the new functionality.